package com.atguigu.bigdata.scala.mytest.chapter04

object Function2 {
    def main(args: Array[String]): Unit = {
      def test():Unit={
        println("1111")
      }

      def test1():String={
        return "123"
      }

      def test2(name:String,age:Int):Unit={
        println("1111")
      }

      def test3(name:String,age:Int):String={
        return "123"
      }

      def test4(name:String,age:Int*):String={
        //嵌套
        def test3(name:String,age:Int):String={
          return "123"
        }
        return "123"
      }

      def test5(name:String="aaa",pw:Int=123): Unit ={
        println(name,pw)
      }
      test5()

      test5(pw=5555)
    }

    //方法
    def test3(name:String,age:Int):String={
      return "123"
    }
}
